package cn.cqie.attendance.common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author FallInLove
 * @since 2021-06-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Annex对象", description="")
@NoArgsConstructor
public class Attachment extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "附件地址")
    private String address;

    @ApiModelProperty(value = "0 老师下发作业 1 学生上传作业 2 老师审批作业 3 学生请假申请")
    private Integer type;

    @ApiModelProperty(value = "请假id")
    private Integer leaveId;

    @ApiModelProperty(value = "作业id")
    private Integer homeworkId;

    @ApiModelProperty(value = "发布作业id")
    private Integer publishHomeworkId;

    public Attachment(String address, Integer type, Integer leaveId, Integer homeworkId, Integer publishHomeworkId) {
        this.address = address;
        this.type = type;
        this.leaveId = leaveId;
        this.homeworkId = homeworkId;
        this.publishHomeworkId = publishHomeworkId;
    }
}
